# Create your views here.
from django.http import HttpResponse, Http404
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
from django.core.files import File
from django.utils import simplejson

def index(request):
    return render_to_response('static_site/index.html')
       
def js(request):
    return render_to_response('static_site/projection.js',mimetype="application/javascript")

def css(request):
    return render_to_response('static_site/menu_style.css',mimetype="text/css")
	
def get_file(request):
	f = open ('static_site/house.obj','r')
	res_dict=[]
	line = f.readline() 
	while line: 
		res_dict.append(line)
		line = f.readline()  
	return HttpResponse(simplejson.dumps(res_dict), 
						mimetype='application/javascript')

def add_file(request):
	f = open ('static_site/wall.obj','r')
	res_dict=[]
	line = f.readline() 
	while line: 
		res_dict.append(line)
		line = f.readline()  
	return HttpResponse(simplejson.dumps(res_dict), 
						mimetype='application/javascript')
		
